package com.scenic.rd_android.testview.animation;

import android.content.Context;
import android.graphics.Canvas;
import android.graphics.Paint;
import android.util.AttributeSet;
import android.view.View;

public  class ValueAnimatorView extends View {

        AnimationActivity.Point point = new AnimationActivity.Point(0,0);
        private Paint paint = new Paint();

        public ValueAnimatorView(Context context) {
            super(context);
        }

        public ValueAnimatorView(Context context, AttributeSet attrs) {
            super(context, attrs);
        }

        public ValueAnimatorView(Context context, AttributeSet attrs, int defStyleAttr) {
            super(context, attrs, defStyleAttr);
        }


        public void refresh(AnimationActivity.Point point){
            this.point = point;
        }

        @Override
        public void invalidate() {
            super.invalidate();

        }

        @Override
        protected void onDraw(Canvas canvas) {
            super.onDraw(canvas);


            canvas.drawCircle(point.getX(),point.getY(),50,paint);
        }
    }